package com.bean;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Location entity. @author MyEclipse Persistence Tools
 */

public class Location implements java.io.Serializable {

	// Fields

	/** serialVersionUID*/
	private static final long serialVersionUID = 4919786629780614891L;
	
	private Integer id;
	private String code;
	private String name;
	private BigDecimal longitude;
	private BigDecimal latitude;
	private Integer pid;
	private Integer status;
	
	private List<Location> subLocation = new ArrayList<Location>();
	
	public boolean add(Location loc){
		return subLocation.add(loc);
	}

	// Constructors

	/** default constructor */
	public Location() {
	}

	/** full constructor */
	public Location(String code, String name, BigDecimal longitude,
			BigDecimal latitude, Integer pid, Integer status) {
		this.code = code;
		this.name = name;
		this.longitude = longitude;
		this.latitude = latitude;
		this.pid = pid;
		this.status = status;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public BigDecimal getLongitude() {
		return this.longitude;
	}

	public void setLongitude(BigDecimal longitude) {
		this.longitude = longitude;
	}

	public BigDecimal getLatitude() {
		return this.latitude;
	}

	public void setLatitude(BigDecimal latitude) {
		this.latitude = latitude;
	}

	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public List<Location> getSubLocation() {
		return subLocation;
	}

	public void setSubLocation(List<Location> subLocation) {
		this.subLocation = subLocation;
	}

}